﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

//using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Threading;
using System.Windows.Media.Imaging;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows;
using System.Media;
using Coding4Fun.Kinect.Wpf.Controls;
using System.Windows.Media;
using com.skype.api;
using Hugo.UIOptions;

namespace Hugo.UIPages
{
    public class SkypeMessageListUI : SlidingTileUIPage
    {
        private string recipient;
        private List<SkypeMessageUIOption> options;
        
        public SkypeMessageListUI(String recipient, List<SkypeMessageUIOption> options, BitmapSource iconSource)
            : this(recipient,recipient, options, iconSource)
        { }

        public SkypeMessageListUI(String name, String recipient,  List<SkypeMessageUIOption> options, BitmapSource iconSource)
            : base(name, iconSource)
        {

            this.options = options;
            this.clearPage();
            this.recipient = recipient;
            foreach (SkypeMessageUIOption s in options)
            {
                this.addUIOption(s);
            }
            
        }

        public override void setPage()
        {
            foreach (SkypeMessageUIOption s in options)
            {
                s.setRecipient(recipient);
            }
            base.setPage();
        }

        public override string getDescription()
        {
            //if (recipient == null) { return this.Name; }
            return "Which message to send?";// to " + (recipient.Equals(GlobalSettings.nurseSkypeID) ? GlobalSettings.nurseSkypeID : recipient) + "?";
        }
       

        public static List<SkypeMessageUIOption> getStandardMessageOptions()
        {
            List<SkypeMessageUIOption> options = new List<SkypeMessageUIOption>();
            options.Add(new SkypeMessageUIOption("Good morning"));
            options.Add(new SkypeMessageUIOption("I am in pain"));
            options.Add(new SkypeMessageUIOption("I am feeling better"));
            options.Add(new SkypeMessageUIOption("What time are your coming?"));
            options.Add(new SkypeMessageUIOption("Goodnight"));
            return options;
        }

        public static List<SkypeMessageUIOption> getStandardHelpOptions()
        {
            List<SkypeMessageUIOption> options = new List<SkypeMessageUIOption>();
            options.Add(new SkypeMessageUIOption("Pain",Util.getBitmapSource(Properties.Resources.icon_pain)));
            options.Add(new SkypeMessageUIOption("Restroom", Util.getBitmapSource(Properties.Resources.icon_restroom)));
            options.Add(new SkypeMessageUIOption("Water", Util.getBitmapSource(Properties.Resources.icon_thirsty)));
            options.Add(new SkypeMessageUIOption("Snack", Util.getBitmapSource(Properties.Resources.icon_hungry)));
            options.Add(new SkypeMessageUIOption("Other help", Util.getBitmapSource(Properties.Resources.icon_info1)));
            return options;
        }
    }
}
